package com.cool4j.view.entity

import org.eclipse.swt.custom.TableEditor
import org.eclipse.swt.widgets.Button
import org.eclipse.swt.widgets.Text

/**
 * 数据库表列表行控件对象
 *
 * @author Frank create on 16/1/8 12:54
 */
class TableItemControl {

    Text tableNameText
    Text classPathText
    Button checkButton
    TableEditor tableNameEditor
    TableEditor classPathEditor
    TableEditor checkEditor

    /**
     * 构造函数
     *
     * @param tableNameText - 数据库表名
     * @param classPathText - 包路径
     * @param checkButton - 选择 checkBox
     * @param tableNameEditor - 数据库表名编辑对象
     * @param classPathEditor - 包路径编辑对象
     * @param checkEditor - 选择 checkBox 编辑对象
     */
    TableItemControl(Text tableNameText, Text classPathText, Button checkButton, TableEditor tableNameEditor,
                     TableEditor classPathEditor, TableEditor checkEditor) {
        this.tableNameText = tableNameText
        this.classPathText = classPathText
        this.checkButton = checkButton
        this.tableNameEditor = tableNameEditor
        this.classPathEditor = classPathEditor
        this.checkEditor = checkEditor
    }

    /** dispose 方法 */
    void dispose() {
        tableNameText.dispose()
        classPathText.dispose()
        checkButton.dispose()
        tableNameEditor.dispose()
        classPathEditor.dispose()
        checkEditor.dispose()
    }

}
